package com.oauth.google.client.ui.orkut.handler;

import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.oauth.components.client.rpc.OAuthAsnyCallBack;
import com.oauth.google.client.rpc.orkut.OrkutRemoteServiceAsync;

public class StatusUpdateHandler implements ValueChangeHandler<String> {

	private OrkutRemoteServiceAsync mService;

	public StatusUpdateHandler(OrkutRemoteServiceAsync pService) {
		mService = pService;
	}

	@Override
	public void onValueChange(ValueChangeEvent<String> pEvent) {
		mService.updateStatus(pEvent.getValue(), new OAuthAsnyCallBack<Boolean>() {
			@Override
			public void onSuccess(Boolean pResult) {

			}
		});
	}

}
